# Maintainer: team/kde <bribbers@disroot.org>
# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
pkgname=plasma-activities-stats
pkgver=6.0.4
pkgrel=0
arch="all !armhf" # armhf blocked by qt6-qtdeclarative
pkgdesc="A library for accessing the usage data collected by the activities system"
url="https://invent.kde.org/plasma/plasma-activities-stats.git"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	boost-dev
	graphviz-dev
	kconfig-dev
	plasma-activities-dev
	qt6-qtdeclarative-dev
	qt6-qttools-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc"
_repo_url="https://invent.kde.org/plasma/plasma-activities-stats.git"
source="https://download.kde.org/stable/plasma/$pkgver/plasma-activities-stats-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
676deda84eab9cde73b4498694913deafb60be041106e945c61431552e3e61e9b71e3dd07fc40282e67d2a2cbfa4318704fbc702f7bc123ea24137bcbf351a0c  plasma-activities-stats-6.0.4.tar.xz
"
